<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<title>用户列表</title>
</head>
<body>
<?php $dayTypes = array(15,31,92);$time=time();?>
<table>
	<thead>
		<tr>
			<th>用户名</th>
			<th>过期时间</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<?php foreach($lists as $v){ ?>
			<tr>
				<td><?php echo $v['usr_name'];?> </td>
				<td><?php echo date('Y-m-d',$v['usr_timeout']);?> </td>
				<td>
					<?php foreach($dayTypes as $day){ ?>
						<a onclick="return confirmAdd('<?php echo $v['usr_name'];?>',<?php echo $day;?>)" href="<?php echo U('Admin/addTime',array('usr_id'=>$v['usr_id'],'day'=>$day,'uat_datetime'=>$time));?>"><?php echo $day;?></a>
					<?php } ?>
				</td>
			</tr>
		<?php } ?>
	</tbody>
</table>
<script>
	function confirmAdd(user,day){
		if(window.confirm(user+'增加'+day+'天?')){
			return true;
		}
		return false;
	}
</script>
</body>
</html>